<script>
import { defineComponent, toRefs } from "vue";
import { prefixCls } from "@/settings/design.setting";
import { createAppProviderContext } from "@/components/Application";

const props = {
  prefixCls: { type: String, default: prefixCls },
};
export default defineComponent({
  name: "AppProvider",
  props,
  setup(props, { slots }) {
    const { prefixCls } = toRefs(props);

    // 全局注入 前缀
    createAppProviderContext({ prefixCls });

    return () => slots.default?.();
  },
});
</script>
